import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../pages/login.vue'
import index from '../pages/index/index.vue'
import welcome from '../components/welcome.vue'
import studentList from '../pages/studentManagement/studentList.vue'
import suggestion from '../pages/studentManagement/suggestion.vue'
import applyCard from '../pages/cardManagement/applyCard.vue'
import lostCard from '../pages/cardManagement/lostList.vue'
import billList from '../pages/billManager/billList.vue'
import newsManage from '../pages/commonManagement/newsManage.vue'
import regularManage from '../pages/commonManagement/regularManage.vue'
import lostFoundManage from '../pages/commonManagement/lostFoundManage.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/', redirect: '/login' },
    { path: '/login', component: login },
    {
      path: '/index',
      component: index,
      redirect: '/welcome',
      children: [
        { path: '/welcome', component: welcome },
        { path: '/studentList', component: studentList },
        { path: '/suggestion', component: suggestion },
        { path: '/applyCard', component: applyCard },
        { path: '/lostCard', component: lostCard },
        { path: '/billList', component: billList },
        { path: '/newsManage', component: newsManage },
        { path: '/regularManage', component: regularManage },
        { path: '/lostFoundManage', component: lostFoundManage }
      ]
    }
  ]
})

export default router
